MosselfestijnPage.render   B
last analyzed

Complexity

Conditions 1

Size

Total Lines 69
Code Lines 60

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 60
dl 0
loc 69
c 0
b 0
f 0
rs 8.309
cc 1

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
import { graphql } from "gatsby";
2
import { GatsbyImage } from "gatsby-plugin-image";
3
import React, { Component } from "react";
4
5
import SEO from "../components/seo";
6
import Layout from "../layouts/index";
7
8
class MosselfestijnPage extends Component {
9
  render() {
10
    const { affiche } = this.props.data;
11
    return (
12
      <Layout>
13
        <SEO
14
          lang="nl-BE"
15
          title="Lunch vd lege portemonnee - Takeaway!"
16
          description="Lege portemonnee Takeaway! - Bestelformulier"
17
          path={this.props.location.pathname}
18
        />
19
        <div className={`limited-width_wrapper`}>
20
          <header>
21
            <h1>Lunch van de lege portemonnee - Takeaway</h1>
22
          </header>
23
          <main>
24
            <h2>Zaterdag 20 februari 2021</h2>
25
            <p>
26
              Door de corona-beperkingen wordt de Lunch vd Lege Portemonne
27
              helaas een Take Away versie. Daarom stellen we een aantal
28
              gerechten voor, die standaard bij onze Lunch horen en waarvan u
29
              kan genieten bij een wijntje of drankje bij u thuis.
30
            </p>
31
32
            <p>Op het menu:</p>
33
            <ul>
34
              <li>Ajuinsoep met kaas - 1L: 8€ per portie</li>
35
              <li>Balletjes in tomatensaus met puree: 10€ per portie</li>
36
              <li>Winterstoemp met spekjes en chipolatta: 11€ per portie</li>
37
              <li>Witloof in den oven met puree: 12€ per portie</li>
38
              <li>Dessert - chocomousse of pannenkoeken met suiker (2): 5€</li>
39
            </ul>
40
            <p>
41
              <strong>
42
                Bestellen kan tot en met woensdag 17 februari 2021!
43
              </strong>
44
            </p>
45
            <p>
46
              Opgelet: Je kan een afhaalmoment kiezen bij het bestellen (16:00 -
47
              20:00). Betalen kan ter plaatse cash (liefst gepast).
48
            </p>
49
50
            <p>
51
              Wie bijkomende vragen heeft kan terecht op
52
              [email protected].
53
              <br />
54
              Alvast bedankt! En graag tot in 2022 voor opnieuw een face-to-face
55
              versie van deze Lunch vd Leige Portemonnee!
56
            </p>
57
58
            <tbkr-bm-widget
59
              restaurant-id="34742560"
60
              source="website"
61
              use-modal="0"
62
              lang="nl"
63
              theme="light"
64
              primary-color="#4b9b48"
65
              takeaway="1"
66
            ></tbkr-bm-widget>
67
            <script src="https://reservations.tablebooker.com/tbkr-widget-import.min.js"></script>
68
69
            <GatsbyImage
70
              image={{
71
                ...affiche.childImageSharp.gatsbyImageData,
72
              }}
73
              alt="Sinterklaas Takeaway"
74
            />
75
          </main>
76
        </div>
77
      </Layout>
78
    );
79
  }
80
}
81
82
export const pageQuery = graphql`
83
  query {
84
    affiche: file(name: { eq: "takeaway-lunch" }) {
85
      ...KCVVFluid960
86
    }
87
  }
88
`;
89
90
export default MosselfestijnPage;
91